module Main where


fib :: Int -> Int
fib n = fibgen 0 1 n

fibgen :: Int -> Int -> Int -> Int
fibgen a b n = case n of
	0 -> a
	n -> fibgen b (a + b) (n-1)


main = do  { x <- readLn; print (fib x) }